import { createRouter, createWebHistory } from 'vue-router';
import UserProfile from '@/components/UserProfile.vue';
import Home from "@/components/Home.vue"
import RestaurantDetail from "@/components/RestaurantDetail.vue";
import Login from "@/components/Login.vue";
import Register from "@/components/Register.vue";

const routes = [
    {
        path: '/user-profile',
        name: 'UserProfile',
        component: UserProfile
    },
    {
        path: '/',
        name: 'Home',
        component: Home,
    },
    {
        path: '/restaurant-detail/:name',
        name: 'RestaurantDetail',
        component: RestaurantDetail
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/register',
        name: 'Register',
        component: Register
    },
];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;
